<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

use Illuminate\Support\Facades\Route;

Route::namespace('user')->group(function (){
    //需要登录并且进行鉴权
    Route::prefix('user')->middleware('UserMiddleware')->group(function (){
         Route::get('/bills','CommonController@bills');

        Route::get('/get_hexiao_code','CommonController@get_hexiao_code');


         Route::get('user_info','UsersController@user_info');
         Route::post('set_pay_pass','UsersController@set_pay_pass');
         //赠送额度
         Route::post('user_send_oli','UsersController@user_send_oli');


         Route::post('add_oli_order','OlisOrderController@add_order');
         Route::get('oli_orders','OlisOrderController@oli_orders');

         Route::get('oli_bills','CommonController@oli_bills');

         Route::get('consumer_coupon_bills','CommonController@consumer_coupon_bills');

         Route::get('qr_code','CommonController@qr_code');

         Route::get('user_spreads','UsersController@user_spreads');
         Route::post('user_send_balance','CommonController@user_send_balance');
         Route::get('data_s','CommonController@data_s');


         Route::get('banks','CommonController@banks');
         Route::get('bills_lists','CommonController@bills_lists');
         Route::get('bill_count','CommonController@bill_count');
         Route::get('user_banks','UserBankController@user_banks');
         Route::post('add_user_bank','UserBankController@add_user_bank');
         Route::post('update_user_bank','UserBankController@update_user_bank');
         Route::post('delete_user_bank','UserBankController@delete_user_bank');
         Route::post('user_create_widthwal','UserBankController@user_create_widthwal');


        Route::post('balance_zhu_transfer','UsersController@balance_zhu_transfer');
        Route::post('write_off','UsersController@write_off');
    });




    //不需要登录的后台接口
    Route::prefix('user')->group(function (){
        Route::get('olis','CommonController@olis');
        Route::post('login','UsersController@login');//后台用户登录
        Route::any('/notice_oli','NoticeController@notice_oli')->name('notice_oli');//后台用户登录

    });
});
